import request from "@/utils/request";

//分页获取器材
export const getAllEquip = (current, size) => request.get('/equip/getByPage/' + current + '/' + size)
//上传器材
export const saveEquipAndUploadImage = formData => request.post('/equip/saveEquip', formData, {headers: {'Content-Type': 'multipart/form-data'}})
//分页获取维修记录
export const getByDynamic = (data, current, size) => request.post('/overhaul/getByDynamic/' + current + '/' + size, data)
//添加维修记录
export const saveOverhaul = data => request.post('/overhaul/addRepairRecord', data)
//修改器材信息
export const updateEquip = formData => request.put('/equip/updateEquipment', formData, {headers: {'Content-Type': 'multipart/form-data'}})
//获取所有器材名称
export const getAllEquipNames = () => request.get('/equip/getAllEquipNames')
//根据id删除器材
export const removeEquipById = id => request.delete('/equip/deleteEquip/' + id)